# 文件IO模块 Makefile

CC = gcc
CFLAGS = -Wall -g -I../Include
AR = ar
ARFLAGS = rcs

TARGET = ../RELEASE/libfileio.a
SOURCES = fileio.c
OBJECTS = $(SOURCES:.c=.o)

all: $(TARGET)

$(TARGET): $(OBJECTS)
	@echo " 创建静态库: $(TARGET)"
	$(AR) $(ARFLAGS) $@ $^
	@cp fileio.h ../Include/

%.o: %.c
	@echo " 编译: $<"
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	@echo " 清理文件IO模块..."
	rm -f $(OBJECTS) $(TARGET)

.PHONY: all clean
